Skip to content

r3.retile: Migrate unexercised shell test to pytest - #8324

Open
echoix wants to merge 1 commit into
OSGeo:mainfrom
echoix:claude/adoring-maxwell-koplb4
Open

echoix wants to merge 1 commit into
OSGeo:mainfrom
echoix:claude/adoring-maxwell-koplb4

Conversation

@echoix

@echoix echoix commented Dec 5, 2026

Copy link
Copy Markdown
Member

Replace the shell test of r3.retile, which CI never runs, with a pytest test. These tests intentionally keep the same shape and general idea of the original; they are not updated to be perfect examples of good tests.

  • The 20 reference files are kept and moved with git mv to tests/data/, so history follows them.
  • The test follows the shell script: same region, same input maps, same ten retile calls (tile sizes with and without -c), compared against the same references.
  • The r3.info -g references predate the rows, cols and depths keys, so the old diff would fail today. Those three keys are ignored; the references are unchanged.

The test was written with AI assistance and reviewed line by line.

Replace the shell script, which is not run by CI, with a pytest test
that follows it: same region, input maps and retile calls, compared
against the same reference files, moved to tests/data.

The r3.info references predate the rows, cols and depths keys, so
those are ignored.

@wenzeslaus wenzeslaus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, cleanup and increased coverage at the same time!

@github-actions github-actions Bot added Python Related code is in Python module tests Related to Test Suite raster3d labels Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module Python Related code is in Python raster3d tests Related to Test Suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants